.class Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;
.super Ljava/lang/Object;
.source "MessagesActivity.java"

# interfaces
.implements Lretrofit/Callback;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->fetchData()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Ljava/lang/Object;",
        "Lretrofit/Callback",
        "<",
        "Lorg/json/JSONObject;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;


# direct methods
.method constructor <init>(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)V
    .registers 2
    .param p1, "this$0"    # Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    .prologue
    .line 212
    iput-object p1, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public failure(Lretrofit/RetrofitError;)V
    .registers 5
    .param p1, "error"    # Lretrofit/RetrofitError;

    .prologue
    const/4 v2, 0x0

    .line 244
    const-string v0, "refresh"

    const-string v1, "error"

    invoke-static {v0, v1, p1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

    .line 245
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # setter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mIsRequesting:Z
    invoke-static {v0, v2}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1202(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;Z)Z

    .line 246
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # operator-- for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mCurrentPage:I
    invoke-static {v0}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$210(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)I

    .line 248
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;
    invoke-static {v0}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$100(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    move-result-object v0

    invoke-virtual {v0}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->onRefreshComplete()V

    .line 249
    iget-object v0, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # invokes: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->getContext()Landroid/content/Context;
    invoke-static {v0}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1500(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Landroid/content/Context;

    move-result-object v0

    const-string v1, "\u52a0\u8f7d\u5931\u8d25\uff0c\u8bf7\u91cd\u8bd5."

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 250
    return-void
.end method

.method public bridge synthetic success(Ljava/lang/Object;Lretrofit/client/Response;)V
    .registers 3

    .prologue
    .line 212
    check-cast p1, Lorg/json/JSONObject;

    invoke-virtual {p0, p1, p2}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->success(Lorg/json/JSONObject;Lretrofit/client/Response;)V

    return-void
.end method

.method public success(Lorg/json/JSONObject;Lretrofit/client/Response;)V
    .registers 11
    .param p1, "jsonObject"    # Lorg/json/JSONObject;
    .param p2, "resp"    # Lretrofit/client/Response;

    .prologue
    const/4 v5, 0x1

    const/4 v4, 0x0

    .line 216
    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # setter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mIsRequesting:Z
    invoke-static {v6, v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1202(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;Z)Z

    .line 218
    const-string v6, "message"

    invoke-virtual {p1, v6}, Lorg/json/JSONObject;->optJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object v0

    .line 219
    .local v0, "jsonMsg":Lorg/json/JSONObject;
    iget-object v6, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    const-string v7, "has_next"

    invoke-virtual {v0, v7}, Lorg/json/JSONObject;->optInt(Ljava/lang/String;)I

    move-result v7

    if-eqz v7, :cond_18

    move v4, v5

    :cond_18
    # setter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mHasNext:Z
    invoke-static {v6, v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$402(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;Z)Z

    .line 221
    const-string v4, "messages"

    invoke-virtual {v0, v4}, Lorg/json/JSONObject;->optJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v1

    .line 222
    .local v1, "jsonMsgArray":Lorg/json/JSONArray;
    invoke-static {v1}, Lcom/brixd/niceapp/userinfo/model/MessageModel;->parse(Lorg/json/JSONArray;)Ljava/util/ArrayList;

    move-result-object v3

    .line 223
    .local v3, "msgList":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/userinfo/model/MessageModel;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mCurrentPage:I
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$200(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)I

    move-result v4

    if-gt v4, v5, :cond_6c

    .line 224
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # setter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mMessages:Ljava/util/ArrayList;
    invoke-static {v4, v3}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$602(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;Ljava/util/ArrayList;)Ljava/util/ArrayList;

    .line 231
    :goto_32
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mAdapter:Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1300(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;

    move-result-object v4

    iget-object v5, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mMessages:Ljava/util/ArrayList;
    invoke-static {v5}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$600(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Ljava/util/ArrayList;

    move-result-object v5

    invoke-virtual {v4, v5}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->setMessages(Ljava/util/List;)V

    .line 232
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mAdapter:Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1300(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->notifyDataSetChanged()V

    .line 233
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mPullToRefreshListView:Lcom/handmark/pulltorefresh/library/PullToRefreshListView;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$100(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Lcom/handmark/pulltorefresh/library/PullToRefreshListView;

    move-result-object v4

    invoke-virtual {v4}, Lcom/handmark/pulltorefresh/library/PullToRefreshListView;->onRefreshComplete()V

    .line 235
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mAdapter:Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1300(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;

    move-result-object v4

    invoke-virtual {v4}, Lcom/brixd/niceapp/userinfo/adapter/MessageAdapter;->isEmpty()Z

    move-result v4

    if-eqz v4, :cond_83

    .line 236
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->emptyTextView:Landroid/widget/TextView;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1400(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Landroid/widget/TextView;

    move-result-object v4

    const v5, 0x7f0c00a1

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(I)V

    .line 240
    :goto_6b
    return-void

    .line 226
    :cond_6c
    new-instance v2, Ljava/util/ArrayList;

    invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V

    .line 227
    .local v2, "list":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/userinfo/model/MessageModel;>;"
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mMessages:Ljava/util/ArrayList;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$600(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Ljava/util/ArrayList;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 228
    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z

    .line 229
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # setter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->mMessages:Ljava/util/ArrayList;
    invoke-static {v4, v2}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$602(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;Ljava/util/ArrayList;)Ljava/util/ArrayList;

    goto :goto_32

    .line 238
    .end local v2    # "list":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/userinfo/model/MessageModel;>;"
    :cond_83
    iget-object v4, p0, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity$6;->this$0:Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;

    # getter for: Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->emptyTextView:Landroid/widget/TextView;
    invoke-static {v4}, Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;->access$1400(Lcom/brixd/niceapp/userinfo/activity/MessagesActivity;)Landroid/widget/TextView;

    move-result-object v4

    const-string v5, ""

    invoke-virtual {v4, v5}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    goto :goto_6b
.end method
